#!/bin/bash

export CMD_DRAW=/mnt/genomics/NGS/cmd_draw
export GENOMICS_BIN=/mnt/genomics/NGS/bin

for i in *1_export.txt.gz; do 
	prefix=$(echo $i | sed s/_1_export.txt.gz//)
	$GENOMICS_BIN/fq_all2std.pl export2std <(zcat ${prefix}_1_export.txt.gz) | gzip > fastq/${prefix}_R1_$prefix.fastq.gz
	$GENOMICS_BIN/fq_all2std.pl export2std <(zcat ${prefix}_2_export.txt.gz) | gzip > fastq/${prefix}_R2_$prefix.fastq.gz
done
